/***************************************************************************\
 * The Mattise Kernel														*
 * Copyright 2007 Matthew Iselin											*
 * Licensed under the GPL													*
 *																			*
 * dma.cc																	*
 *																			*
 * Handles DMA requests, simple as that										*
 *																			*
\***************************************************************************/

// includes
#include <system.h>
#include <dma.h>

// macros
#define LOBYTE( x )			( (uchar_t) ( x & 0x00FF ) )
#define HIBYTE( x )			( (uchar_t) ( ( x & 0xFF00 ) >> 8 ) )

// quick access to registers and ports for the channels
/*
uchar_t MaskReg[8] = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD3, 0xD4, 0xD4, 0xD4 };
uchar_t ModeReg[8] = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 };
uchar_t ClearReg[8] = { 0x0C, 0x0C, 0x0C, 0x0C, 0xDB, 0xDB, 0xDB, 0xDB };
uchar_t PagePort[8] = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A };
uchar_t AddrPort[8] = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC };
uchar_t CountPort[8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE };
*/
